home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Interactive CD Sampler / Microsoft Interactive CD Sampler.iso / DEMOS / CARPOINT / CARPOINT.DIR / 00023_cp.ls < prev    next >
Encoding:
Text File  |  1996-08-02  |  1.9 KB  |  62 lines

  1. on mouseUp
  2.   if the movieRate of sprite 3 = 0 then
  3.     Connect()
  4.   end if
  5. end
  6.  
  7. on oldConnect
  8.   openXLib(the pathName & "FILEIO.DLL")
  9.   set loFILEIO to FileIO(mnew, "read", the pathName & "XLAUNCH.TXT")
  10.   set lvLaunchFiles to loFILEIO(mReadFile)
  11.   loFILEIO(mdispose)
  12.   set lvWindowsFile to line 1 of lvLaunchFiles
  13.   set lvCarSourceAddress to char 2 to 2000 of line 2 of lvLaunchFiles
  14.   openXLib(the pathName & "MISC_X.DLL")
  15.   set loMISC_X to misc_x(mnew)
  16.   set lvAnswerIsTrue to loMISC_X(mFileExists, lvWindowsFile)
  17.   loMISC_X(mdispose)
  18.   closeXLib(the pathName & "MISC_X.DLL")
  19.   if lvAnswerIsTrue then
  20.     go("Launch")
  21.     open(lvCarSourceAddress)
  22.     quit()
  23.   else
  24.     go("Error")
  25.   end if
  26. end
  27.  
  28. on xConnect
  29.   openXLib(the pathName & "FILEIO.DLL")
  30.   set loFILEIO to FileIO(mnew, "read", the pathName & "LAUNCH.TXT")
  31.   set lvLaunchFiles to loFILEIO(mReadFile)
  32.   loFILEIO(mdispose)
  33.   set lvCarSourceAddress to line 1 of lvLaunchFiles
  34.   closeXLib(the pathName & "FILEIO.DLL")
  35.   openXLib(the pathName & "dllglue.dll")
  36.   set loGetDesktopWindow to dllglue(mnew, "USER32", "getDesktopWindow", "L", "V")
  37.   set loShellExecute to dllglue(mnew, "SHELL32", "shellExecuteA", "L", "LSSSSL")
  38.   set lvRet to loShellExecute(mCall, loGetDesktopWindow(mCall), "open", lvCarSourceAddress, EMPTY, EMPTY, 10)
  39.   loGetDesktopWindow(mdispose)
  40.   loShellExecute(mdispose)
  41.   closeXLib(the pathName & "DLLGLUE.DLL")
  42.   if lvRet <= 32 then
  43.     go("Error")
  44.   else
  45.     go("launch")
  46.   end if
  47. end
  48.  
  49. on Connect
  50.   openXLib(the pathName & "FILEIO.DLL")
  51.   set loFILEIO to FileIO(mnew, "read", the pathName & "LAUNCH.TXT")
  52.   set lvLaunchFiles to loFILEIO(mReadFile)
  53.   loFILEIO(mdispose)
  54.   set lvCarSourceAddress to line 1 of lvLaunchFiles
  55.   closeXLib(the pathName & "FILEIO.DLL")
  56.   openXLib(the pathName & "dllglue.dll")
  57.   set loWinExec to dllglue(mnew, "KERNEL", "WinExec", "I", "SI")
  58.   set lvRet to loWinExec(mCall, "start " & lvCarSourceAddress, 1)
  59.   loWinExec(mdispose)
  60.   closeXLib(the pathName & "DLLGLUE.DLL")
  61. end
  62.